//
//  TJRandomColor.swift
//  TJSinaWeibo
//
//  Created by 唐后能 on 16/4/15.
//  Copyright © 2016年 itheima. All rights reserved.
//

import UIKit

extension UIColor {

    // 类方法,返回一个随机颜色.
    class func randomColor()->UIColor {
        let r = CGFloat(arc4random_uniform(256)) / 255.0
        let g = CGFloat(arc4random_uniform(256)) / 255.0
        let b = CGFloat(arc4random_uniform(256)) / 255.0
        return UIColor(red: r, green: g, blue: b, alpha: 1)
    }
}
